package org.df.ulab.bot.util.command;

import org.df.ulab.bot.api.message.ImMessage;
import org.df.ulab.bot.api.message.Message;

/**
 * @author Daniel Filgueiras
 * @since 19/06/2011
 */
public abstract class InternetCommand extends AbstractCommand {

	protected String remoteId;
	
	@Override
	public boolean proccess(Message message) {
		if (message instanceof ImMessage) {
			ImMessage iMessage = ((ImMessage)message);
			remoteId = iMessage.getRemoteId();
			
			return proccess(iMessage);
		}
		return false;
	}
	
	public abstract boolean proccess(ImMessage message);

}
